QReadWriteLock: fix data race on the d_ptr members
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 29 Jan 2026 19:25:23 +0000 (22:25 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 29 Jan 2026 19:25:23 +0000 (22:25 +0300)
commit6ce270bd78b436c69051b95f1566957df90034ab
treefef13e6a776d60fdf79d70b359a7e438acb25198
parent2742060c19194dcb55242eb395451d58457d9c6e
QReadWriteLock: fix data race on the d_ptr members

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit?id=80d01c4ccb697b9d
Last-Update: 2025-12-14

The loadRelaxed() at the beginning of tryLockForRead/tryLockForWrite
isn't enough to bring us the non-atomic write of the recursive bool.
Same issue with the std::mutex itself.

Gbp-Pq: Name qreadwritelock_data_race.diff
src/corelib/thread/qreadwritelock.cpp